package com.lesso.zgs.sunflower.app.service.impl;

import com.baomidou.mybatisplus.plugins.Page;
import com.lesso.zgs.sunflower.domain.service.DeviceDomainService;
import com.lesso.zgs.sunflower.pojo.dto.DeviceDTO;
import com.lesso.zgs.sunflower.pojo.dto.DeviceQueryDTO;
import com.lesso.zgs.sunflower.pojo.vo.DeviceVO;
import com.lesso.zgs.sunflower.service.IDeviceService;
import org.apache.dubbo.config.annotation.DubboService;

/**
 * <p>
 * 设备基础信息 服务实现类
 * </p>
 *
 * @author zgs
 * @since 2025-07-03
 */
@DubboService
public class DeviceServiceImpl implements IDeviceService {

    private final DeviceDomainService deviceDomainService;

    public DeviceServiceImpl(DeviceDomainService deviceDomainService) {
        this.deviceDomainService = deviceDomainService;
    }

    @Override
    public Integer save(DeviceDTO dto) {
        return deviceDomainService.save(dto);
    }

    @Override
    public DeviceDTO getById(Long id) {
        return deviceDomainService.getById(id);
    }

    @Override
    public Integer update(DeviceDTO dto) {
        return deviceDomainService.update(dto);
    }

    @Override
    public Integer delete(Long id) {
        return deviceDomainService.delete(id);
    }

    @Override
    public Page<DeviceVO> page(DeviceQueryDTO dto) {
        return deviceDomainService.page(dto);
    }
} 